#include "tcphelper.h"

TcpHelper::TcpHelper()
{
    initTcp();
}

TcpHelper::~TcpHelper()
{

}

void TcpHelper::initTcp()
{
    QObject::connect(this, SIGNAL(connected()), this, SLOT(&TcpHelper::slotConnected()));
    QObject::connect(this, SIGNAL(disconnected()), this, SLOT(&TcpHelper::slotDisconnected()));
    QObject::connect(this, SIGNAL(readyRead()), this, SLOT(&TcpHelper::slotReceive()), Qt::QueuedConnection);
    QObject::connect(this,
                     SIGNAL(error(QAbstractSocket::SocketError)),
                     this,
                     SLOT(&TcpHelper::slotError(QAbstractSocket::SocketError)));
    QObject::connect(this,
                     SIGNAL(stateChanged(QAbstractSocket::SocketState)),
                     this,
                     SLOT(&TcpHelper::slotStateChange(QAbstractSocket::SocketState)));
}

void TcpHelper::slotConnected()
{

}

void TcpHelper::slotDisconnected()
{

}

void TcpHelper::slotReceive()
{

}

void TcpHelper::slotError(QAbstractSocket::SocketError e)
{

}

void TcpHelper::slotStateChange(QAbstractSocket::SocketState)
{

}

void TcpHelper::slotWriteData(const QString &buffer, int ctrlNo)
{

}
